<?php include THEMES_PATH . 'public/before_body2.phtml';?>
<!-- build:css /statics/front/pkg/css/product.css -->
<link href="/statics/front/css/product.css" rel="stylesheet">
<!-- endbuild -->
</head>
<body>
<?php include THEMES_PATH . 'public/header2.phtml';?>
<?php if($productInfo['id'] == 692): ?>
<script type="application/ld+json">
{
  "@context" : "http://schema.org",
  "@type" : "Product",
  "name" : "Classic Black Suit",
  "image" : "http://58.215.187.187/data/2015/02/13/54dda971d093f.jpg",
  "description" : "Nothing can replace the classic black suit. And made from 100% wool, this suit is perfect for the on-the-go man. Comfortable for any occasion, look your best no matter where you go.",
  "url" : "http://58.215.187.187/product/692-classic-black-suit",
  "brand" : {
    "@type" : "Brand",
    "name" : "OWNONLY",
    "logo" : "http://58.215.187.187/statics/front/images/logo.png"
  },
  "offers" : {
    "@type" : "Offer",
    "price" : "329"
  },
  "aggregateRating" : {
    "@type" : "AggregateRating",
    "ratingValue" : "5 Stars",
    "ratingCount" : "13"
  }
}
</script>
<?php endif;?>
<?php
  if($productInfo['model_id'] == 25 && $productInfo['backgroundPhotoList']){
    $productInfo['bg_img'] = $productInfo['backgroundPhotoList'][0]['img'];
  }
?>
<div class="mt1x pt3x product-wrapper<?php if($productInfo['model_id'] == 25): ?> shoes-wrapper<?php   endif;?> js-product-wrapper" style="background:#fff url(<?php echo $productInfo['bg_img']; ?>) no-repeat 50% 0;">
  <div class="clearfix main-width rel">
    <!--左侧信息栏-->
    <div class="col-md-4 col-sm-6 product-info">
      <?php if($productInfo['display'] != 1):?><span class="sold-out"></span><?php endif;?>
      <span class="back-prev-page js-back">&lt; <?php echo L('back');?></span>
      <h1 class="title"><?php echo $productInfo['name'];?></h1>
      <div style="position:relative;top:-20px;">
        <p class="title product-price" >
          <?php
            if($productInfo['original_price'] > 0){
              $three_price = currency($productInfo['original_price']);
              $three_result = "<del>$three_price</del>";
              echo $three_result;
            }
          ?>
          <?php echo currency($productInfo['advanced_price']);?>
        </p>
        <?php
          if($productComment['star'] > 0):
        ?>
        <span class="comment-star">
          <?php
            if($productComment['star'] == 0) $productComment['star'] = 5;
              for($star=0;$star<$productComment['star'];$star++):
          ?>
          <span class="fa fa-star"></span>
          <?php endfor;?>
          <?php for($star=0;$star<(5-$productComment['star']);$star++):?>
          <span class="fa fa-star-o"></span>
          <?php endfor;?>
        </span>
        <?php endif;?>
        <span>(<a class="comment-num text" href="#product-comment"><?php if($productComment['count'] <= 0){echo L('No_review');}else if($productComment['count'] == 1){echo $productComment['count'].' '.L('Customer_Review');}else{echo $productComment['count'].' '.L('Customer_Reviews');}?></a>)</span>
      </div>
      <div class="vi-sm vi-xs mb1x rel carousel-mobile">
        <div class="ovh js-carousel" id="js-carousel-mobile">
          <ul class="rel">
            <?php
              if (isset($productInfo['photoList']) && $productInfo['photoList']):
                foreach ($productInfo['photoList'] as $i => $file):
                  $i++;
            ?>
            <li>
              <img src="<?php echo $file['img']; ?>" class="vm">
            </li>
            <?php
                endforeach;
              endif;
            ?>
          </ul>
        </div>
        <p class="carousel-pagination js-carousel-pagination"></p>
      </div>
      <div class="mb1x align-right product-desc">
        <p><?php echo $productInfo['summary']; ?></p>
        <span class="js-view-more"><?php echo L('_View_More_'); ?></span>
      </div>
      <div class="mb1x btn-dropdown js-btn-dropdown <?php if($productInfo['model_id'] != 27):?> hide<?php endif;?>">
   
		<button<?php echo $productInfo['display'] == 0 ? ' disabled' : ''; ?> data-tips="<strong>Checkout faster.</strong>Select standard size to customize faster." class="btn width-full"><?php echo L('_BUY_IT_');?></button>
        <?php if($productInfo['display'] != 0): ?>
        <div class="dropdown">
          <p class="align-right"><a href="<?php echo url('/product/sizeGuide',array('pid'=>$productInfo['id']));?>" target="_blank" style="text-decoration:underline;"><?php echo L('SIZE_GUIDE');?></a></p>
          <?php
            $key_k = 1;
            foreach($size_type_res as $key=>$sizeRes):
          ?>
          <dl class="clear" data-id="<?php echo $key;?>">
            <?php if($key == 1):?>
            <dt data-type="blazers"><?php echo count($size_type_res)>1?$key_k.' . ':'';echo L('Jacket_Size');?></dt>
            <?php endif;?>
            <?php if($key == 3):?>
            <dt data-type="pants"><?php echo count($size_type_res)>1?$key_k.' . ':'';echo L('Pant_Size');?></dt>
            <?php endif;?>
            <?php if($key == 2):?>
            <dt data-type="vests"><?php echo count($size_type_res)>1?$key_k.' . ':'';echo L('Vest_Size');?></dt>
            <?php endif;?>
            <?php if($key == 4):?>
            <dt data-type="shirts"><?php echo count($size_type_res)>1?$key_k.' . ':'';echo L('Shirt_Size');?></dt>
            <?php endif;?>
            <?php if($key == 5):?>
            <dt data-type="coats"><?php echo count($size_type_res)>1?$key_k.' . ':'';echo L('Coat_Size');?></dt>
            <?php endif;?>
            <?php foreach($sizeRes as $val):?>
            <dd><?php echo $val['size'];?></dd>
            <?php endforeach;?>
          </dl>
          <?php
            $key_k++;
            endforeach;
          ?>
          <button disabled class="btn mt1x width-full" data-href="<?php echo $productInfo['display'] == 1 ? url('product/custom/'. $productInfo['id'].'-'.generateUrl_un($productInfo['english_name'])) : 'javascript:;';?>?buy=now"><?php echo L('SUBMIT');?></button>
        </div>
        <?php endif;?>
      </div>
	  <?php if(!empty($productInfo['show_attr_ids'])):?>
      <a href="<?php echo $productInfo['display'] == 1 ? url('product/custom/'. $productInfo['id'].'-'.generateUrl_un($productInfo['english_name'])) : 'javascript:;';?>" class="btn width-full<?php echo $productInfo['display'] == 0 ? ' disabled' : ''; ?>"><?php echo L('_CUSTOMIZE_IT_');?></a>
		 <?php endif;?> 
      <?php
        $send_days = ($categoryInfo['parentid'] == 2062)?9:20;
      ?>
      <div class="mt2x mb1x">
        <div class="clear"><?php echo $productInfo['content']?></div>
        <img src="<?php echo $productInfo['ml_img']?>" class="cloth" hidden>
      </div>
      <?php
        $advanced_price = $productInfo['advanced_price'];
        $original_price = $productInfo['original_price'];
      ?>
      <ul class="clearfix pt1x align-center border-top shopping-clause">
        <li>
          <span><?php echo L('receiver_by_november');?></span>
          <p><img src="/statics/front/images/icons/lightning.png" alt="<?php echo L('receiver_by_november');?>"></p>
        </li>
        <li>
          <span><?php echo L('free_shipping');?></span>
          <p><img src="/statics/front/images/icons/shipment.png" alt="<?php echo L('free_shipping');?>"></p>
        </li>
        <li>
          <span><?php if($productInfo['model_id'] == 25):?><?php echo L('_RETURN_EXCHANGE_POLICY_');?><?php else:?><?php echo L('fit_promise');?><?php endif;?></span>
          <p><img src="/statics/front/images/icons/fit.png" alt="<?php echo L('fit_promise');?>"></p>
        </li>
      </ul>
      <div class="mt1x sns">
        <p class="mb1x"><?php echo L('SHARE_GET');?></p>
        <ul class="clearfix align-center">
          <li>
            <a class="qzone" href="javascript:void(0);" onClick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(document.location.href));return false;" title="分享到QQ空间" rel="nofollow">
              <img src="/statics/front/images/icons/qqzone.png" alt="qq空间" class="vt">
            </a>
          </li>
          <li>
            <a class="weibo" href="javascript:void(0);" onClick="window.open('http://service.weibo.com/share/share.php?appkey=583395093&title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(document.location.href)+'&source=bshare&retcode=0&ralateUid=');return false;" title="分享到新浪微博" rel="nofollow">
              <img src="/statics/front/images/icons/weibo.png" alt="微博" class="vt">
            </a>
          </li>
        </ul>
      </div>
    </div>
    <?php
      $is_m_show = false;
      if(in_array($productInfo['id'] ,array(692,671))):
      $is_m_show = true;
      $medias = array(
        692 => '692',
        671 => '671',
      );
    ?>
    <?php endif; ?>
    <?php if($productInfo['model_id'] == 25): ?>
    <?php if(count($productInfo['backgroundPhotoList'])>0){ ?>
    <div class="rotate-show js-rotate-show">
      <ul>
        <?php
          if (isset($productInfo['backgroundPhotoList']) && $productInfo['backgroundPhotoList']):
            foreach ($productInfo['backgroundPhotoList'] as $key => $file):
        ?>
        <li<?php if($key == 0):?> class="show"<?php endif;?>>
          <img src="<?php echo $file['img'];?>">
        </li>
        <?php
            endforeach;
          endif;
        ?>
      </ul>
    </div>
    <span class="rotating"></span>
    <?php }else{?>
      <div class="rotate-show js-rotate-show">
      <ul>
      <li class="show">
      	<img src="<?php echo str_replace("thumb_","",$productInfo['photoList'][0]['thumb']); ?>" />
      </li>
      </ul>
      </div>
    <?php } ?>
    <?php endif;?>
    <!--右侧图片列表-->
    <div class="hi-sm hi-xs pro-gallery js-pro-gallery">
     
      <ul>
        <?php
          if (isset($productInfo['photoList']) && $productInfo['photoList']):
            foreach ($productInfo['photoList'] as $i => $file):
            $i++;
        ?>
        <li><img src="<?php echo $file['thumb'];?>"></li>
        <?php
            endforeach;
          endif;
        ?>
      </ul>
    </div>
  </div>
</div>
<div class="album js-album">
  <ul>
    <?php
      if (isset($productInfo['photoList']) && $productInfo['photoList']):
        foreach ($productInfo['photoList'] as $i => $file):
        $i++;
    ?>
    <li>
      <img src="<?php echo $file['img']; ?>">
    </li>
    <?php
        endforeach;
      endif;
    ?>
  </ul>
  <i class="pull-left js-left"></i>
  <i class="pull-right js-right"></i>
  <span class="close js-close">×</span>
</div>
<!--产品评论-->
<div id="product-comment" class="product-comment main-width">
  <div class="heading product-comment-title"><strong><?php echo L('Customer_Reviews'); ?></strong></div>
  <?php if ($productComment['count'] < 1): ?>
  <div class="align-center text no-comment"><?php echo L('No_reviews_here'); ?></div>
  <?php endif; ?>
</div>
<div class="main-width heading">
  <strong><?php echo L('_Also_Viewed_');?></strong>
</div>
<div class="ovh rel main-width align-center carousel-box">
  <div class="ovh carousel js-carousel">
    <ul class="rel">
      <?php
        if(isset($productList) && $productList):
          foreach ($productList as $key => $product):
            if(!$product){
              continue;
            }
      ?>
      <li>
        <a href="<?php echo $product['url'];?>">
          <img src="<?php echo $product['goods_img']?>">
          <?php if(!empty($product['ml_img'])){ ?>
          <img src="<?php echo $product['ml_img']?>" class="hide">
          <?php } ?>
        </a>
        <p>
          <a href="<?php echo $product['url'];?>"><?php echo $product['name'];?></a>
        </p>
        <p>
          <?php
            if($product['attribute_type']==2){
              if($product['product_type']){
                echo currency($product['sell_price']);
              }else{
                echo currency($product['advanced_price']);
              }
            }elseif($product['attribute_type']==1){
              echo currency($product['custom_price']);
            }
          ?>
        </p>
      </li>
      <?php
          endforeach;
        endif;
      ?>
    </ul>
  </div>
  <span class="fa fa-2x fa-chevron-left carousel-control-prev js-carousel-control-prev"></span>
  <span class="fa fa-2x fa-chevron-right carousel-control-next js-carousel-control-next"></span>
</div>
<!-- build:js /statics/front/pkg/js/carousel.js -->
<script src="/statics/front/js/plugins/carousel/jquery.jcarousel.min.js"></script>
<script src="/statics/front/js/plugins/carousel/jquery.jcarousel-swipe.min.js"></script>
<script src="/statics/front/js/scripts/carousel-list.js"></script>
<!-- endbuild -->
<!-- build:js /statics/front/pkg/js/product-details.js -->
<script src="/statics/front/js/plugins/jquery.popupBox.js"></script>
<script src="/statics/front/js/scripts/product-details/product-details.js"></script>
<script src="/statics/front/js/scripts/product-details/rotate.js"></script>
<script src="/statics/front/js/scripts/slide.js"></script>
<!-- endbuild -->
<script>
var _init = false;
function customerReviews(page) {
  $.ajax({
    type: 'GET',
    url: '/product/reviews',
    data: {'pid':<?php echo $productInfo['id'];?>, 'p': page},
    success: function (content) {
      if(_init)
        $(".comment-num").trigger("click");
      _init = true;
      $('.product-comment-title').nextAll().remove();
      $('.product-comment-title').after(content);
    }
  })
}
<?php if($productComment['count'] > 0):?>
customerReviews(1);
<?php endif;?>
</script>
<?php include THEMES_PATH.'public/footer2.phtml';?>
<?php include THEMES_PATH.'public/after_body.phtml';?>